package com.tian.mapper;

import com.tian.dto.UserCouponRecordDto;
import com.tian.entity.UserCouponRecord;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface UserCouponRecordMapper {
    int deleteByPrimaryKey(Long id);

    int insert(UserCouponRecord record);

    UserCouponRecord selectByPrimaryKey(Long id);

    List<UserCouponRecord> selectAll();

    int countByUserIdAndCouponId(@Param("userId") Long userId, @Param("couponId") Integer couponId);

    int count(UserCouponRecordDto userCouponRecordDto);
    List<UserCouponRecord>  list(UserCouponRecordDto userCouponRecordDto);

    int updateByPrimaryKey(UserCouponRecord record);
}